package com.jxnu.escms.utils;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Random;
import java.util.UUID;
import java.util.logging.SimpleFormatter;

@Slf4j
@SpringBootTest
public class testPython {
    @Resource
    private UpdateData updatePython;

    @Test
    public void testPython(){
      log.info("start spider");
      updatePython.updateData();
      log.info("end ");
    }

    @Test
    public void getTime(){
//        SimpleDateFormat simpleFormatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
//        System.out.println(simpleFormatter.format(new Date()));
        System.out.println("亲爱的" + "name" + "先生/女士\n" + "   您好：");
        System.out.println("\t您的验证码是：152632, 请在5分钟内完成验证。");
        Random random = new Random();
        String[] s = String.valueOf(random.nextDouble()*1e6).split("\\.");
        System.out.println(s[0]);
    }
}
